package com.hang.ad.controller;

import com.hang.ad.exceptions.AdException;
import com.hang.ad.service.IUserService;
import com.hang.ad.vo.CreateUserRequest;
import com.hang.ad.vo.CreateUserResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class UserController {
    @Autowired
    IUserService userServiceImpl;
    @PostMapping("/create/user")
    public CreateUserResponse createUser(@RequestBody CreateUserRequest request) throws AdException {
        return userServiceImpl.createUser(request);
    }
}
